<!--:
var action = "system/role/list";
var searchContent = {
-->
<input type="text" name="attr.name" value="${attr.name}" placeholder="请输入名称"/>
<!--:
};
var panelBar = {
-->
<ul class="toolBar">
    <li>
        <a class="edit" href="system/role/view/{did}" target="dialog" rel="role-view" width="820" height="440">
            <span>查看</span>
        </a>
    </li>
    <#haspermission name="system/role/list:*">
        <li class="line"></li>
        <li>
            <a class="add" href="system/role/edit" target="dialog" rel="role-add" width="820" height="440">
                <span>添加</span>
            </a>
        </li>
        <li class="line"></li>
        <li>
            <a class="edit" href="system/role/edit/{did}" target="dialog" rel="role-edit" width="820" height="440">
                <span>修改</span>
            </a>
        </li>
        <li class="line"></li>
        <li>
            <a class="edit" href="system/role/editAuth/{did}" target="dialog" rel="role-auth" width="820" height="440">
                <span>授权</span>
            </a>
        </li>
        <li class="line"></li>
        <li>
            <a class="delete" href="system/role/delete/{did}" target="ajaxTodo" title="确定要删除吗?">
                <span>删除</span>
            </a>
        </li>
    </#haspermission>
</ul>
<!--:
};
var table = {
-->
<thead>
<tr>
    <th>序号</th>
    <th orderfield="name" class="${haitai.orderClass('name', orderField!, orderDirection!)}">名称</th>
    <th orderfield="status" class="${haitai.orderClass('status', orderField!, orderDirection!)}">
        状态
    </th>
    <th orderfield="sort" class="${haitai.orderClass('sort', orderField!, orderDirection!)}">排序</th>
    <th>说明</th>
    <th width="40%">查看菜单权限</th>
    <th width="40%">修改菜单权限</th>
</tr>
</thead>
<tbody>
<!--:for (item in page.list) {-->
<tr target="did" rel="${item.id}">
    <td>${itemLP.index}</td>
    <td>${item.name}</td>
    <td>
        <!--:
        select(item.status) {
            case 1:
                print('显示');
            case 2:
                print('隐藏');
        }
        -->
    </td>
    <td title="${item.sort}">${item.sort}</td>
    <td title="${item.remark}">${item.remark}</td>
    <td title="${item.viewMenus}">${item.viewMenus}</td>
    <td title="${item.updateMenus}">${item.updateMenus}</td>
</tr>
<!--:}-->
</tbody>
<!--:
};
layout("/template/navTabPage.html",
        {action : action,
         searchContent : searchContent,
         panelBar : panelBar,
         table : table}) {}
-->